package com.iurac.dao;

import com.iurac.domain.Borrow;
import com.iurac.domain.BorrowHistory;
import com.iurac.vo.BorrowVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BorrowDao {

    List<BorrowVo> getBorrowByCondition(@Param("title") String title, @Param("username") String username, @Param("userId") String userId);

    int deleteBorrowById(@Param("id") String id);

    List<BorrowVo> getBorrowByUid( @Param("userId") String userId);

    int borrowBook(Borrow borrow);

    List<BorrowVo> getBorrowByAccount(@Param("account") String account);

    int renewBook(@Param("id") String id,@Param("renewDay")  String renewDay);

    Borrow getBorrowById(@Param("id") String id);
}
